home *** CD-ROM | disk | FTP | other *** search
- [ tunnel driver - installation instructions and general comments]
-
- This is the tunnel driver for routing IP packets over other networks.
- In particular it can be used for rfc877 encapsualtion of IP packets
- over X.25 - but the kernel level driver just delivers IP packets to
- listening processes. The approximate steps for installation of the
- driver are as follows.
-
- 1. Copy the file if_tun.c and if_tnreg.h to the directory
- /usr/sys/netinet. Also make sure that if_tnreg.h appears in
- /usr/include/netinet as well - this may occur as a result of the first
- copy.
- If you are running SunOs 4.0, add a line
- #define SUNOS4
- somewhere at the start of /usr/sys/netinet/if_tun.c.
-
- 2. Edit the file /usr/sys/{sun,vax,whatever}/conf.c and add these
- lines before the start of the cdevsw table. This starts with something
- like
- ------------------------------------------------------------------
- struct cdevsw cdevsw[] =
- {
- {
- cnopen, cnclose, cnread, cnwrite, /*0*/
- ------------------------------------------------------------------
- The lines to add here are
-
- ------------------------------------------------------------------
- #include "tun.h"
- #if NTUN > 0
- int tunopen (), tunclose (), tuncioctl (), tunread (),
- tunwrite (), tunselect ();
- #else
- #define tunopen nodev
- #define tunclose nodev
- #define tuncioctl nodev
- #define tunread nodev
- #define tunwrite nodev
- #define tunselect nodev
- #endif
- ------------------------------------------------------------------
- Then, at the end of the cdevsw table add the following lines-
- ------------------------------------------------------------------
- for bsd or SunOs 3.x :
- ------------------------------------------------------------------
- {
- tunopen, tunclose, tunread, tunwrite, /*??*/
- tuncioctl, nulldev, nulldev, 0,
- tunselect, 0, 0,
- },
- ------------------------------------------------------------------
- for SunOs 4.0 :
- ------------------------------------------------------------------
- {
- tunopen, tunclose, tunread, tunwrite, /*??*/
- tuncioctl, nulldev, tunselect, 0,
- 0,
- },
- ------------------------------------------------------------------
-
- The ?? should be filled in as appropriate - it is the nth entry in the
- table its probably somewhere in the range of 30-50. There is usually a
- similar comment for the previous device, just add one to that if this
- is the case. Remember this number as it is used later.
-
- 3. Edit the file /usr/sys/conf/files and add the line
- ------------------------------------------------------------------
- netinet/if_tun.c optional tun
- ------------------------------------------------------------------
- at somewhere appropriate.
-
- 4. Edit your configuration file /usr/sys/conf/MACHINE_NAME and add the
- line
- ------------------------------------------------------------------
- pseudo-device tunX
- ------------------------------------------------------------------
- where X is the number of tunnels you require (1 for each interface
- address you require to use i.e. for X.25 1 for each remote connection
- you are likely to want at the same time.)
-
- 5. run config on your configuration file (/etc/config MACHINE_NAME)
- and build the kernel and install it in a bootable place. You may get
- some problems with the make. config doesn't always notice #ifdef lines
- so there may be a spurious dependency on the sun an the file
- ../vax/mptr.h. If you get the message
- Directory ../vax: Make: Cannot open. Stop.
- then edit the makefile and remove the line giving this dependency.
-
- 6. Construct the devices in /dev/ by running MAKEDEV.tun XX YY where
- XX is the major device number (index in the cdevsw found in step 2)
- and YY is the number of device you want (this should be the same as
- the X in step 4 - but it shouldn't hurt if its more).
-
- 7. Thats it - boot up the new kernel and the device should be
- runnable.
-
- [Note: the following step is not applicable to NOS users. KA9WSB]
- 8. Compile the tunnel daemon (make) and edit a config file. This is
- documented in tund.8c and there is an example file.
-
- If there are problems, you can try contacting me at one of the
- following addresses.
-
- Julian Onions (jpo@cs.nott.ac.uk)
- Computer Science Department
- Nottingham University
- Nottingham, NG7 2RD
- ENGLAND
-
- +44 602 506101 x3595
-